using DealerPlatform.Domain;

namespace DealerPlatform.Service.OrderApp;

public partial class OrderService
{
    private async Task AddProgress(string orderNo, DateTime stepTime)
    {
        SaleOrderProgress progress = new()
        {
            ProgressGuid = Guid.NewGuid().ToString(),
            SaleOrderNo = orderNo,
            StepName = "下单",
            StepSn = 1,
            StepTime = stepTime
        };
        await saleOrderProgressRepository.InsertAsync(progress);
    }

    private async Task<List<SaleOrderProgress>> GetProgressByOrderNos(params string[] orderNos)
    {
        var progress = await saleOrderProgressRepository.GetListAsync(m => orderNos.Contains(m.SaleOrderNo));
        return progress;
    }
}